home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / langs / dl_exsrc.zoo / timer.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-27  |  319 b   |  20 lines

  1. #include <osbind.h>
  2. #include <time.h>
  3.  
  4. #define HZ_200 ((unsigned long *)0x4baL)
  5.  
  6. static unsigned long grab_hz200()
  7. {
  8.   return *HZ_200;
  9. }
  10.  
  11. clock_t start_timer(register clock_t *t)
  12. {
  13.   return (*t = Supexec(grab_hz200));
  14. }
  15.  
  16. clock_t time_since(register clock_t *t)
  17. {
  18.   return Supexec(grab_hz200) - *t;
  19. }
  20.